package com.jake.spring.config;

import com.jake.spring.dao.PersonDao;
import com.jake.spring.dao.impl.AwarePersonDaoImpl;
import com.jake.spring.dao.impl.NoAwarePersonDaoImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class PersonDaoConfig {

    @Bean(initMethod = "initBean", destroyMethod = "destroyBean")
    PersonDao awarePersonDaoImpl() {
        return new AwarePersonDaoImpl();
    }

    @Bean(initMethod = "initBean", destroyMethod = "destroyBean")
    PersonDao noAwarePersonDaoImpl() {
        return new NoAwarePersonDaoImpl();
    }

}
